import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listMenu(query) {
  return request({
    url: '/business/systemProject/group/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getMenu(groupId) {
  return request({
    url: '/business/systemProject/group/' + groupId,
    method: 'get'
  })
}

export function getGroupMenuTree(groupId) {
  return request({
    url: `/business/group/menu/tree/${groupId}`,
    method: 'get'
  })
}

export function updateGroupMenus(data) {
  return request({
    url: '/business/group/menu/updateGroupMenus',
    method: 'put',
    data: data
  })
}


// 新增【请填写功能名称】
export function addSystemProjectMenu(data) {
  return request({
    url: '/business/systemProject/group',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateMenu(data) {
  return request({
    url: '/business/systemProject/group',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delMenu(groupId) {
  return request({
    url: '/business/systemProject/group/' + groupId,
    method: 'delete'
  })
}
